<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:insert="~{include :: header('模板预览')}" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox-content">
            <div class="row">
                <div class="col-sm-12">
                    <h3 class="text-center" th:text="${template.templateName}">模板名称</h3>
                    <div class="template-meta text-center" style="margin: 20px 0;">
                        <span class="badge badge-info" th:text="${template.templateType}">模板类型</span>
                        <span class="badge badge-warning" th:text="${template.priority}">优先级</span>
                        <span class="text-muted">编码：<span th:text="${template.templateCode}">模板编码</span></span>
                        <span class="text-muted">状态：<span th:text="${template.status == 1 ? '启用' : '禁用'}">状态</span></span>
                    </div>
                    
                    <div class="template-content" style="border: 1px solid #eee; padding: 20px; border-radius: 5px; min-height: 200px;">
                        <h4>模板标题：<span th:text="${template.title}">模板标题</span></h4>
                        <div th:utext="${template.content}">模板内容</div>
                    </div>
                    
                    <div class="template-vars" th:if="${template.templateVars}" style="margin-top: 20px;">
                        <h5>模板变量定义：</h5>
                        <pre th:text="${template.templateVars}">变量定义</pre>
                    </div>
                    
                    <div class="template-actions text-center" style="margin-top: 30px;">
                        <button type="button" class="btn btn-secondary" onclick="$.modal.close()">
                            <i class="fa fa-close"></i> 关闭
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>